﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="zxx" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <title>Ayurvedic - Medical Template</title>

    <link rel="shortcut icon" type="image/x-icon" href="assets/images/cropped-favicon-32x32.png"/>

    <link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>

    <link href="assets/css/style.css" rel="stylesheet" type="text/css"/>

    <link href="assets/css/plugin.css" rel="stylesheet" type="text/css"/>

    <link href="assets/css/dashboard.css" rel="stylesheet" type="text/css"/>

    <link href="assets/fonts/flaticon.css" rel="stylesheet" type="text/css"/>

    <link href="assets/css/icons.css" rel="stylesheet" type="text/css"/>

    <link rel="stylesheet" href="assets/fonts/line-icons.css" type="text/css"/>
    <link rel="stylesheet" href="common/font-awesome/css/font-awesome.min.css">
</head>
<body>

<div id="preloader">
    <div id="status"></div>
</div>


<div th:replace="common/common-bar::#header"></div>

<div id="dashboard">
    <div class="container">
        <div class="dashboard-main">
            <div class="row">
                <div class="col-lg-3 col-md-12 col-sm-12 col-xs-12">
                    <div th:replace="common/common-bar::#dashboard-sidebar(cur='profile')"></div>
                </div>
                <div class="col-lg-9 col-md-12 col-sm-12 col-xs-12">
                    <div class="dashboard-content">
                        <div class="dashboard-form mb-4">
                            <div class="row">

                                <div class="col-lg-12 col-md-12 col-xs-12 padding-right-30">
                                    <div class="dashboard-list">
                                        <h4 class="gray">我的资料</h4>
                                        <div class="dashboard-list-static">

                                            <div class="edit-profile-photo">
                                                <img id="img-preview" th:src="${session.loginUser.imgPath}" alt=""/>
                                                <div class="change-photo-btn">
                                                    <div class="photoUpload">
                                                        <span><i class="fa fa-upload"></i> 点击上传</span>
                                                        <input id="img-file" type="file" class="upload" onchange="uploadPhoto()"/>
                                                        <input style="display: none" id="img" th:value="${session.loginUser.imgPath}" type="text"/>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="my-profile">
                                                <div class="row">
                                                    <div class="col-6">
                                                        <div class="form-group">
                                                            <label>账户名称</label>
                                                            <input style="background: #ecf0f1" disabled
                                                                   th:value="${session.loginUser.userAccount}"
                                                                   type="text"/>
                                                            <input id="userId" style="display: none"
                                                                   th:value="${session.loginUser.id}" type="text"/>
                                                        </div>
                                                    </div>
                                                    <div class="col-6">
                                                        <div class="form-group">
                                                            <label>真实姓名</label>
                                                            <input id="userName"
                                                                   th:value="${session.loginUser.userName}"
                                                                   type="text"/>
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="row">
                                                    <div class="col-6">
                                                        <div class="form-group">
                                                            <label>性别</label>
                                                            <input disabled style="background: #ecf0f1"
                                                                   th:value="${session.loginUser.userSex}" type="text"/>
                                                        </div>
                                                    </div>
                                                    <div class="col-6">
                                                        <div class="form-group">
                                                            <label>年龄</label>
                                                            <input id="userAge" th:value="${session.loginUser.userAge}"
                                                                   type="number"/>
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="row">
                                                    <div class="col-6">
                                                        <div class="form-group">
                                                            <label>邮箱</label>
                                                            <input style="background: #ecf0f1" disabled
                                                                   th:value="${session.loginUser.userEmail}"
                                                                   type="text"/>
                                                        </div>
                                                    </div>
                                                    <div class="col-6">
                                                        <div class="form-group">
                                                            <label>手机号</label>
                                                            <input id="userTel" th:value="${session.loginUser.userTel}"
                                                                   type="number"/>
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="form-group">
                                                    <label>注册时间</label>
                                                    <input style="background: #ecf0f1" disabled
                                                           th:value="${#dates.format(session.loginUser.createTime, 'yyyy年MM月dd日 HH:mm:ss')}"
                                                           type="text"/>
                                                </div>

                                            </div>
                                            <div>
                                                <button class="btn btn-na" onclick="updateProfile()">保存修改</button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="dashboard-form mb-4">
                            <div class="dashboard-password">
                                <h4>修改登录密码</h4>
                                <div class="row">
                                    <div class="col-lg-4 col-md-12 col-sm-12 col-xs-12">
                                        <div class="form-group">
                                            <label>当前密码</label>
                                            <input id="oldPassword" type="password" placeholder=""/>
                                        </div>
                                    </div>
                                    <div class="col-lg-4 col-md-12 col-sm-12 col-xs-12">
                                        <div class="form-group">
                                            <label>新密码</label>
                                            <input id="password1" type="password"/>
                                        </div>
                                    </div>
                                    <div class="col-lg-4 col-md-12 col-sm-12 col-xs-12">
                                        <div class="form-group">
                                            <label>确认密码</label>
                                            <input id="password2" type="password"/>
                                        </div>
                                    </div>
                                    <div class="col-lg-12">
                                        <div class="mt-2">
                                            <button onclick="updatePassword()" class="btn btn-na">修改密码</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>

<div th:replace="common/common-bar::#back"></div>

<div th:replace="common/common-bar::#footer"></div>

<div th:replace="common/common-bar::#search"></div>

<div th:replace="common/common-bar::#back-to-top"></div>

<script src="assets/js/jquery-3.5.1.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/plugin.js"></script>
<script src="assets/js/main.js"></script>
<script src="assets/js/custom-nav.js"></script>
<script src="assets/js/jpanelmenu.min.js"></script>
<script src="assets/js/dashboard-custom.js"></script>
<script src="common/utils/reg.js"></script>
<script src="common/layer/layer.js"></script>
<script src="common/custom.js"></script>
</body>
</html>
